iOS: Logging Part 2 – Basic File Persistence - #69587
Conversation
|
Apologies for the chunky PR folks! I saw how big it was getting and tried to document a little extra to make it easier to review. Please let me know if it's burdensome and I'll take another stab at breaking it down. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2a990a9f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <key>NSCameraUsageDescription</key> | ||
| <string>Teleport Verify uses the built-in QR code scanner to receive enrollment data from the Teleport Web UI</string> | ||
| <key>NSFaceIDUsageDescription</key> | ||
| <string>Teleport Verify uses Face ID to confirm your presence when proving this device's identity</string> |
There was a problem hiding this comment.
Does this now live in mobile/Verify/Verify.xcodeproj/project.pbxproj?
There was a problem hiding this comment.
yeah it does, though it wasn't an intentional change on my part. Sometimes, when you're changing Xcode versions (I updated to Xcode 27 beta 5 with this change) it reorganizes things based on its own internal preferences. It doesn't happen often, but it does happen as this change demonstrates.
There was a problem hiding this comment.
Does this mean that if someone else on the team decides not to run beta 5 that their IDE will revert the change?
There was a problem hiding this comment.
it's possible! I've been pretty cavalier with upgrading to the latest beta since I'm functionally the only one building the app at the moment, but should other people take interest in contributing in the near future, the common practice I would employ is having a long-lived xcode27 branch that I would periodically merge main into so that we can keep up with changes in Xcode 27 over the course of the summer and be able to cut over to it at some point.
73667a5 to
867d1e8
Compare
867d1e8 to
b05473c
Compare
zmb3
left a comment
There was a problem hiding this comment.
What do we end up doing with these logs?
Is there some debug view or something where users would be able to see them or send them to us?
| <key>NSCameraUsageDescription</key> | ||
| <string>Teleport Verify uses the built-in QR code scanner to receive enrollment data from the Teleport Web UI</string> | ||
| <key>NSFaceIDUsageDescription</key> | ||
| <string>Teleport Verify uses Face ID to confirm your presence when proving this device's identity</string> |
There was a problem hiding this comment.
Does this mean that if someone else on the team decides not to run beta 5 that their IDE will revert the change?
That's the idea, though the UI isn't in place yet. They'll be recorded locally and if a user has a problem, we can ask them to go into the settings view and send us the logs via email. |
b05473c to
f03035d
Compare
f03035d to
14afbbf
Compare
…or more efficient log storage
14afbbf to
ee56483
Compare
|
Closing this to re-open in the new |
This PR adds the first increment of persistent logging support to TeleportKit.
It:
RotatingFileLogHandlerand the sharedRotatingFileWriterflush()as an ordered inbox marker that synchronizes all earlier writesLogBackendstest target and shared Xcode schemeScope
This PR intentionally implements only basic append and flush behavior. Rotation, retention, oversized-record truncation, inbox backpressure, dropped-record notices, and advanced failure recovery will follow in separate PRs.
The file handler is not yet bootstrapped into Verify.
Testing
Running the unit tests for this PR should be done on the command line inside the
TeleportKitdirectory via theswift testcommand. This requires Swift 6.4. If you have the Xcode 27 beta installed, you can do so by usingxcrun:xcrun swift testTest Cases
flush()returns.RotatingFileLogHandlersends its formatted record through the shared writer.